package com.ziyun.pop.modules.production.vo;

import com.ziyun.pop.common.e.production.FinanceStatusEnum;
import com.ziyun.pop.common.e.production.OrderProductionStatusEnum;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 外协订单
 * @author gaosheng
 * @date 2018-12-26 14:17
 */
@Getter
@Setter
public class OrderSupplierVo {

    /**
     * 生产单ID
     */
    private Integer productionId;
    /**
     * 订单号
     */
    private String orderNo;
    /**
     * 供应商名称
     */
    private String producerName;
    /**
     * 生产状态
     */
    private Integer productionStatus;
    /**
     * 图文宝生产状态
     */
    private String twbProductionStatusText;

    public String getTwbProductionStatusText() {
        if (this.productionStatus == OrderProductionStatusEnum.FINISH.toInt()){
            return "生产完成";
        }else {
            return "生产中";
        }
    }

    /**
     * 订单金额
     */
    private BigDecimal totalAmount;
    /**
     * 分配金额
     */
    private BigDecimal cost;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 创建人
     */
    private String createName;
    /**
     * 订单备注
     */
    private String memo;
    /**
     * 付款状态
     */
    private Integer financeStatus;
    /**
     * 图文宝付款状态
     */
    private Integer twbFinanceStatusText;

    public String getTwbFinanceStatusText() {
        if (this.financeStatus == FinanceStatusEnum.PAYD.toInt()){
            return "已付款";
        }else {
            return "未付款";
        }
    }

    /**
     * 付款时间
     */
    private Date financePaytime;

}
